<?php
namespace app\chat\model;
class ChatMsg extends Base
{
    protected function initialize()
    {
        parent::initialize();
    }

    /* 是否包含禁词 */
    public static function isBan ($word) {
        if(!config('chat_ban_word')) {
            return false;
        }
        $arr = explode(',',config('chat_ban_word'));

        foreach($arr as $k=>$v) {
            if(stristr($word,$v)) {
                return true;
            }
        }
        return false;
    }
}